export const arrayMoveItem = (arr: any[], from: number, to: number) => {
    if (from < to) {
        // 如果index1小于index2，那么index1和index2之间的数据都往前移动一位
        arr.splice(to + 1, 0, arr[from]);
        arr.splice(from, 1);
    } else {
        const [item] = arr.splice(from, 1);
        arr.splice(to, 0, item);
    }
};